#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#define name_max 20
#define ph_max 15
#define addr_max 50
#define set_max 5
#define MAX 100
enum option {
	ADD=1,
	DEL,
	SEARCH,
	MODIFY,
	SHOW,
	SORT,
	DELALL,
	EXIT
};
typedef struct peoinfo {
	char name[name_max];
	char set[set_max];
	int age;
	char ph[ph_max];
	char addr[addr_max];
}peoinfo;
typedef struct contact {
	peoinfo date[MAX];
	int sz;
}contact;
void menu();
void initcontact(contact* con);
int findbyname(contact* con, char* name);
void addcontact(contact* con);
void delcontact(contact* con);
void searchcontact(contact* con);
void modifycontact(contact* con);
void showcontact(contact* con);
int sortcontact(const void* arr, const void* arr2);
